/**
 * Created by lenovo on 2017/4/20.
 */
(function(){
    //点击登录
   /* $('.submit').on('click',function(e){
        window.location.href = 'index.html';
        e.preventDefault();
    })*/
    $('.find').on('click',function(e){
        window.location.href = 'find.html';
        e.preventDefault();
    })
    $('#submit').click(function(){
//  	console.log($('#loginFrom').serialize())
    	//登录接口
    $.ajax({
        url:config.baseUrl+'/auth/login/phone',
        type:'post',
        data:$('#loginFrom').serialize(),
        dataType:'json',
        success:function(result){
        if(result.code==0){
        config.sessionStroageSet("clubId",result.body.cludId)
        window.location.href = 'index.html';
        }else{
        	$(".mes").text("账号或密码错误")
        }
        }
        
       
    })
    })

    
})()